# 继承语法
#B类继承A类

class A:
    def __init__(self,a,b):
        self.name = a         #属性可以继承
        self.age = b

class B(A):
    pass


b = B('张三',15)                  # 参数也可继承
print(b.name)
print(b.age)